import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;


public class Client {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws UnknownHostException 
	 */
	public static void main(String[] args) throws UnknownHostException, IOException { 
		Socket socket = new Socket("127.0.0.1", 8080);
		Scanner socketIn = new Scanner(socket.getInputStream());
		PrintWriter socketOut = new PrintWriter(socket.getOutputStream(), true);
	
		
		while (true)
		{
			try {
				
				Scanner s = new Scanner(System.in);
				String string = s.nextLine();
				socketOut.println(string);
			}
			catch(Exception e)
			{
				
			}
		}
	}

}
